import {createRouter,createWebHashHistory} from 'vue-router';
//创建路由规则
const routes = [
    {
        path:'/login',
        name:'login',
        component:() => import('../views/login/index.vue')
    },
    {
        path:'/',
        name:"layout",
        component: () => import('../views/layout/index.vue'),
        children:[
            {
                path:"home",
                name:"home",
                component:() => import('../views/home/index.vue')
            },
            {
                path:"video",
                name:"video",
                component:() => import ('../views/video/index.vue')
            },
            {
                path:"search",
                name:"search",
                component:() => import('../views/search/index.vue')
            },
            {
                path:"my",
                name:"my",
                component: () => import('../views/my/index.vue')
            },
        ]
    }
];
//创建路由实例
const router = createRouter({
    history:createWebHashHistory(),
    routes, //`routes:routes`
});
export default router
//创建登录组件
//指定出口
